package com.java.throwable.Custom;

public class Main {
    public static void main(String[] args) {
        try {
            try {
                throw new ArithmeticException("算术异常");
            } catch (ArithmeticException e) {
                // 更改异常类型或统一向外暴露异常
                throw new MyException("自定义异常-" + e.getMessage());
            }
        } catch (MyException e) {
            System.out.println(e.getMessage()); // 自定义异常-算术异常
        }
    }
}
